package chapter_13_proxy.force_proxy;

/**
 * @author yaochenglong
 * @date 2017/10/19
 */
public class GamePlayerProxy implements IGamePlayer {

    private IGamePlayer iGamePlayer;

    public GamePlayerProxy(IGamePlayer iGamePlayer) {
        this.iGamePlayer = iGamePlayer;
    }

    @Override
    public void login() {
        iGamePlayer.login();
    }

    @Override
    public void killBoss() {
        iGamePlayer.killBoss();
    }

    @Override
    public void upgrade() {
        iGamePlayer.upgrade();
    }

    @Override
    public IGamePlayer getProxy() {
        return this;
    }
}
